package sdstcom.lbq.one;

import android.content.Intent;
import android.graphics.Paint;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.transition.Slide;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

import java.util.HashMap;

import sdstcom.lbq.one.lbq.activity.CollectActivity;
import sdstcom.lbq.one.lbq.activity.GedanActivity;
import sdstcom.lbq.one.lbq.activity.HeadimgActivity;
import sdstcom.lbq.one.lbq.activity.LBQEssayActivity;
import sdstcom.lbq.one.lbq.activity.LBQmovieActivity;
import sdstcom.lbq.one.lbq.activity.LBQmusicActivity;
import sdstcom.lbq.one.lbq.activity.OtherSettingActivity;
import sdstcom.lbq.one.lbq.activity.Pic_essayActivity;
import sdstcom.lbq.one.lbq.activity.XiaojiActivity;


public class RightScrollActivity extends AppCompatActivity implements View.OnClickListener{

    private CardView cardview;
    private Toolbar toolbar;
    private ImageView headimg;
    private Button xiaoji;
    private Button gedan;
    private LinearLayout collect;
    private LinearLayout pic_essay;
    private LinearLayout essay;
    private LinearLayout music;
    private LinearLayout movie;
    private LinearLayout night;
    private LinearLayout other;
    private LinearLayout feelback;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_right_scroll);
        init();

    }

    private void init() {
        if (Build.VERSION.SDK_INT > 21) {
            Slide slide = new Slide(Gravity.LEFT);
            slide.setDuration(1000);
            getWindow().setEnterTransition(slide);
            cardview= (CardView) findViewById(R.id.right_cardview);
            cardview.setRadius(50);
        }
        toolbar= (Toolbar) findViewById(R.id.right_toolbar);
        toolbar.setTitle("one 用户 22550");
        toolbar.setNavigationIcon(R.mipmap.ali_feedback_icon_back_white);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        headimg= (ImageView) findViewById(R.id.right_headimg);
        headimg.setOnClickListener(this);
        xiaoji= (Button) findViewById(R.id.right_xiaoji);
        xiaoji.setOnClickListener(this);
        gedan= (Button) findViewById(R.id.right_gedan);
        gedan.setOnClickListener(this);
        collect= (LinearLayout) findViewById(R.id.right_collect);
        collect.setOnClickListener(this);
        pic_essay= (LinearLayout) findViewById(R.id.right_pic_essay);
        pic_essay.setOnClickListener(this);
        essay= (LinearLayout) findViewById(R.id.right_essay);
        essay.setOnClickListener(this);
        music= (LinearLayout) findViewById(R.id.right_music);
        movie= (LinearLayout) findViewById(R.id.right_movie);
        other= (LinearLayout) findViewById(R.id.right_other);
        night= (LinearLayout) findViewById(R.id.right_night);
        feelback= (LinearLayout) findViewById(R.id.right_feelback);
        music.setOnClickListener(this);
        movie.setOnClickListener(this);
        other.setOnClickListener(this);
        night.setOnClickListener(this);
        feelback.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {

        switch(v.getId())
        {
            case R.id.right_headimg:
                startActivity(new Intent(RightScrollActivity.this,HeadimgActivity.class));
                break;
            case R.id.right_xiaoji:
                startActivity(new Intent(RightScrollActivity.this,XiaojiActivity.class));
                break;
            case  R.id.right_gedan:
                startActivity(new Intent(RightScrollActivity.this,GedanActivity.class));
                break;
            case R.id.right_collect:
                startActivity(new Intent(RightScrollActivity.this,CollectActivity.class));
                break;
            case R.id.right_pic_essay:
                startActivity(new Intent(RightScrollActivity.this,Pic_essayActivity.class));
                break;
            case  R.id.right_essay:
                startActivity(new Intent(RightScrollActivity.this,LBQEssayActivity.class));
                break;
            case R.id.right_movie:
                startActivity(new Intent(RightScrollActivity.this,LBQmovieActivity.class));
                break;
            case R.id.right_music:
                startActivity(new Intent(RightScrollActivity.this,LBQmusicActivity .class));
                break;
            case R.id.right_night:
                Toast.makeText(this,"版本开发中，请期待",Toast.LENGTH_SHORT).show();
                break;
            case R.id.right_other:
                startActivity(new Intent(RightScrollActivity.this,OtherSettingActivity.class));
                break;
            case R.id.right_feelback:
                Toast.makeText(this,"官方网站："+"http://wufazhuce.com/"+"欢迎提出您宝贵的意见",Toast.LENGTH_SHORT).show();
                break;

        }
    }
}
